using UnityEngine;
using System.Collections;

public class Menu : MonoBehaviour {

    public Texture2D texture;
    public Texture2D buttonStart;
    public Texture2D buttonCredits;

    int buttonWitdh = 200;
    int buttonHeight = 50;

    
	void Start () {    
    }
	
	void Update () {
	}

    void OnGUI()
    {
        GUI.DrawTexture(new Rect(0.0f,
                0.0f,
                texture.width * Screen.width / 960.0f,
                texture.height * Screen.height / 512.0f), texture);
        
        if (GUI.Button(new Rect(texture.width / 2 + buttonWitdh /2, texture.height / 2 + buttonHeight / 2, buttonWitdh, buttonHeight),
            buttonStart, GUIStyle.none))
        {
            Application.LoadLevel("04_Game");
        }

        if (GUI.Button(new Rect(texture.width / 2 + buttonWitdh / 2, texture.height / 2 + buttonHeight * 2, buttonWitdh, buttonHeight), buttonCredits, GUIStyle.none))
        {
            Application.LoadLevel("03_Credits");
        }
    }    
}
